<template>
  <kk-container title="动态详情" :isShowHeader="true">
    <view class="prodectDetail">
      <view class="prodectDetail-title">{{ detail.title }}</view>
      <view class="prodectDetail-desc">{{ detailDesc() }}</view>

      <up-parse
        class="prodectDetail-content"
        :content="detail.content"
      ></up-parse>
    </view>
  </kk-container>
</template>

<script setup>
import { onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";

const detail = ref({});

onLoad((options) => {
  detail.value = JSON.parse(decodeURIComponent(options.data));
});

// 详情描述
const detailDesc = () => {
  return detail.value
    ? `${detail.value.createAdminName}发布于 ${detail.value.createdAt}`
    : "";
};
</script>

<style lang="scss" scoped>
.prodectDetail {
  padding: 24rpx;
  &-title {
    font-weight: 500;
    font-size: 32rpx;
    color: #333333;
    line-height: 34rpx;
  }
  &-desc {
    padding-top: 25rpx;
    padding-bottom: 25rpx;
    font-size: 28rpx;
    color: #666666;
    line-height: 36rpx;
  }
  &-content {
    padding-top: 42rpx;
    font-size: 28rpx;
    color: #666666;
    line-height: 36rpx;
  }
}
</style>
